package com.alibaba.mqtt.provider.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;


@Configuration
@ConfigurationProperties(prefix = "mqtt")
public class BaseMqttConfig {
    @Value("${mqtt.broker}")
    public static String broker;

    @Value("${mqtt.port}")
    public static Integer port;

    @Value("${mqtt.qos}")
    public static int qos;

    @Value("${mqtt.hasSSL}")
    public static Boolean hasSSL;

    @Value("${mqtt.userName}")
    public static String userName;

    @Value("${mqtt.password}")
    public static String password;

    @Value("${mqtt.TCP}")
    public static String TCP;

    @Value("${mqtt.SSL}")
    public static String SSL;

    @Value("${mqtt.colon}")
    public static String colon;

    @Value("${mqtt.pubClientId}")
    public static String pubClientId;

    @Value("${mqtt.subClientId}")
    public static String subClientId;

    public static String getBroker() {
        return broker;
    }

    public void setBroker(String broker) {
        BaseMqttConfig.broker = broker;
    }

    public static Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        BaseMqttConfig.port = port;
    }

    public static int getQos() {
        return qos;
    }

    public void setQos(int qos) {
        BaseMqttConfig.qos = qos;
    }

    public static Boolean getHasSSL() {
        return hasSSL;
    }

    public void setHasSSL(Boolean hasSSL) {
        BaseMqttConfig.hasSSL = hasSSL;
    }

    public static String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        BaseMqttConfig.userName = userName;
    }

    public static String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        BaseMqttConfig.password = password;
    }

    public static String getTCP() {
        return TCP;
    }

    public void setTCP(String TCP) {
        BaseMqttConfig.TCP = TCP;
    }

    public static String getSSL() {
        return SSL;
    }

    public void setSSL(String SSL) {
        BaseMqttConfig.SSL = SSL;
    }

    public static String getColon() {
        return colon;
    }

    public void setColon(String colon) {
        BaseMqttConfig.colon = colon;
    }

    public static String getPubClientId() {
        return pubClientId;
    }

    public void setPubClientId(String pubClientId) {
        BaseMqttConfig.pubClientId = pubClientId;
    }

    public static String getSubClientId() {
        return subClientId;
    }

    public void setSubClientId(String subClientId) {
        BaseMqttConfig.subClientId = subClientId;
    }
}

